#include<stdio.h>
#include<stdlib.h>
int main()
{
int n;
char s[128];
scanf("%d",&n);
printf("%o\n",n);
itoa(n,s,2);
printf("%s\n",s);
printf("%x\n",n);
	
	
	
	
	
return 0;	
}
